﻿using System;
using System.Web;

namespace TQB.Plugin.HttpModule
{
    public class CopyWriteModule : IHttpModule
    {
        #region IHttpModule Members

        public void Dispose()
        {
            //throw new NotImplementedException();
        }

        public void Init(HttpApplication context)
        {
            //context.BeginRequest += new EventHandler(context_BeginRequest);
            context.Error += new EventHandler(context_Error);
        }

        public void context_Error(object sender, EventArgs e)
        {
            //((HttpApplication)sender).Response.Redirect("~/1-4.jpg");
        }

        private void context_BeginRequest(object sender, EventArgs e)
        {

            ((HttpApplication)sender).Response.Write("CopyWrite 2010");
        }

        #endregion
    }
}
